import axios from "../../utils/axios";

// 机构列表
export function getList(query) {
    return axios({
        url: "/admin/system/mechanism/index",
        method: "get",
        params: query
    });
}

// 树
export function getTree(query) {
    return axios({
        url: "/admin/system/mechanism/tree",
        method: "get",
        params: query
    });
}

// 添加
export function add(query) {
    return axios({
        url: "/admin/system/mechanism/save",
        method: "post",
        data: query
    });
}

// 删除
export function del(query) {
    return axios({
        url: "/admin/system/mechanism/delete",
        method: "post",
        data: query
    });
}

// 修改
export function edit(query) {
    return axios({
        url: "/admin/system/mechanism/edit",
        method: "post",
        data: query
    });
}

// 级别获取
export function getLevel(query) {
    return axios({
        url: "/admin/system/mechanism/getMemLevel",
        method: "get",
        params: query
    });
}

// 类型获取
export function getType(query) {
    return axios({
        url: "/admin/system/mechanism/getMemType",
        method: "get",
        params: query
    });
}
